﻿using ShineTech.Domain.SeedWork;
using System;
using System.Collections.Generic;
using System.Linq;

namespace ShineTech.Domain.Models.Missons
{
    public class MissonsByFiltersSpecification : SpecificationBase<Misson>
    {
        public MissonsByFiltersSpecification(string name, Guid? kanbanId,bool? isComplete)
            : base(t => t.Name.Contains(name)
            && (!kanbanId.HasValue || t.KanbanId == kanbanId)
            && (!isComplete.HasValue || t.IsComplete == isComplete))
            
        {

        }
    }

    public class MissonByIdSpecification : SpecificationBase<Misson>
    {
        public MissonByIdSpecification(Guid id)
            : base(t => t.Id == id)
        {

        }
    }

   
}
